<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title><?=SYSTEM_TITLE?></title>

		<link href="<?=base_url("assets/css/bootstrap.min.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/font-awesome/css/font-awesome.css")?>" rel="stylesheet">

		<link href="<?=base_url("assets/css/plugins/summernote/summernote.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/css/plugins/summernote/summernote-bs3.css")?>" rel="stylesheet">
		
		<link href="<?=base_url("assets/css/plugins/jasny/jasny-bootstrap.min.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/css/plugins/chosen/bootstrap-chosen.css")?>" rel="stylesheet">

		<link href="<?=base_url("assets/css/plugins/datapicker/datepicker3.css")?>" rel="stylesheet">

		<link href="<?=base_url("assets/css/animate.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/css/style.css")?>" rel="stylesheet">


		
	</head>

	<body>

		<?$this->load->view("templates/header")?>

        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
				<div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>活动信息</h5>
                    </div>
                    <div class="ibox-content">
						<form action="<?=site_url("main/submit_activity")?>" method="post" class="form-horizontal" enctype="multipart/form-data">
						
							<input type="hidden" name="act_id" value="<?=$act_id?>">
							<div class="form-group">
								<label class="col-sm-2 control-label">活动标题</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_title" value="<?=$object["act_title"]?>" >
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">电影名称</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_movie" value="<?=$object["act_movie"]?>" >
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">活动简介</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_intro" value="<?=$object["act_intro"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">活动日期</label>
								<div class="col-sm-10">
									<input type="text" class="form-control date" name="act_date" value="<?=$object["act_date"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">开始时间 ( 00:00 - 23:59 )</label>
								<div class="col-sm-10">
									<input type="text" class="form-control"  name="act_start_time" value="<?=$object["act_start_time"]?>"/>
									<!--
									<select data-placeholder="请选开始时间" class="chosen-select" name="act_start_time" >
										<?for($i=0;$i<=23;$i++){?>
										<option value="<?=$i?>" <?=$object["act_start_time"]==$i?"selected":""?>><?=$i?>:00</option>
										<?}?>
									</select>
									-->
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">结束时间 ( 00:00 - 23:59 )</label>
								<div class="col-sm-10">
									<input type="text" class="form-control"  name="act_end_time" value="<?=$object["act_end_time"]?>"/>
									<!--
									<select data-placeholder="请选开始时间" class="chosen-select" name="act_end_time" >
										<?for($i=0;$i<=23;$i++){?>
										<option value="<?=$i?>" <?=$object["act_end_time"]==$i?"selected":""?>><?=$i?>:00</option>
										<?}?>
									</select>
									-->
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group tooltip-demo">
								<label class="col-sm-2 control-label">票房抓取参数 movieId 
									<a data-toggle="tooltip" data-placement="top" title="点击查看帮助" href="<?=base_url("assets/如何填写抓取参数.docx")?>">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_data_url" value="<?=$object["act_data_url"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
	
							<div class="form-group">
								<label class="col-sm-2 control-label">机器人出现频率</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_bot_freq" value="<?=$object["act_bot_freq"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">赢家数量</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_win_count" value="<?=$object["act_win_count"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">红包右侧文案</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="act_rules" value="<?=$object["act_rules"]?>">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">电影海报</label>
								<div class="col-sm-5">
									<div class="fileinput fileinput-new" data-provides="fileinput">
										<span class="btn btn-default btn-file"><span class="fileinput-new">请选择要上传的电影海报</span>
										<span class="fileinput-exists">重新选择</span><input type="file" name="file"/></span>
										<span class="fileinput-filename"></span>
										<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">×</a>
										<p class="text-muted">建议图片大小:宽750px  高400px</p>
									</div> 
									
									<div class="col-sm-5">
										<img src="<?=base_url("upload/".$object["act_background"])?>" style="width:100%" class="img-rounded"/>
									</div> 
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">赞助商红包</label>
								<div class="col-sm-5">
									<div class="fileinput fileinput-new" data-provides="fileinput">
										<span class="btn btn-default btn-file"><span class="fileinput-new">请选择要上传的赞助商红包</span>
										<span class="fileinput-exists">重新选择</span><input type="file" name="file2"/></span>
										<span class="fileinput-filename"></span>
										<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">×</a>
										<p class="text-muted">建议图片大小:宽300px  高300px</p>
									</div> 
									
									<div class="col-sm-5">
										<img src="<?=base_url("upload/".$object["act_redpack"])?>" style="width:100%" class="img-rounded"/>
									</div> 
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">赞助商海报</label>
								<div class="col-sm-5">
									<div class="fileinput fileinput-new" data-provides="fileinput">
										<span class="btn btn-default btn-file"><span class="fileinput-new">请选择要上传的赞助商海报</span>
										<span class="fileinput-exists">重新选择</span><input type="file" name="file3"/></span>
										<span class="fileinput-filename"></span>
										<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">×</a>
										<p class="text-muted">建议图片大小:宽750px  高900px</p>
									</div> 
									
									<div class="col-sm-5">
										<img src="<?=base_url("upload/".$object["act_poster"])?>" style="width:100%" class="img-rounded"/>
									</div> 
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							
							
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-2">
									<button class="btn btn-primary" type="submit">提交</button>
									<a class="btn btn-default" type="submit" href="<?=site_url("main/config_management")?>">返回</a>
								</div>
							</div>

						</form>	
					</div>
				</div>
            </div>
		</div>

		<?$this->load->view("templates/footer")?>

		<!-- Mainly scripts -->
		<script src="<?=base_url("assets/js/jquery-3.1.1.min.js")?>"></script>
		<script src="<?=base_url("assets/js/bootstrap.min.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/metisMenu/jquery.metisMenu.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/slimscroll/jquery.slimscroll.min.js")?>"></script>

		<!-- Custom and plugin javascript -->
		<script src="<?=base_url("assets/js/inspinia.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/pace/pace.min.js")?>"></script>

		
		<script src="<?=base_url("assets/js/plugins/jasny/jasny-bootstrap.min.js")?>"></script>
		<!-- Chosen -->
		<script src="<?=base_url("assets/js/plugins/chosen/chosen.jquery.js")?>"></script>

	   <!-- Data picker -->
	   <script src="<?=base_url("assets/js/plugins/datapicker/bootstrap-datepicker.js")?>"></script>
	   <script src="<?=base_url("assets/js/plugins/datapicker/bootstrap-datepicker.zh-CN.min.js")?>"></script>

		
		<!-- SUMMERNOTE -->
		<script src="<?=base_url("assets/js/plugins/summernote/summernote.min.js")?>"></script>
		<script>
		$(document).ready(function(){
			$('.date').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true,
				format: "yyyy-mm-dd",
				language:"zh-CN"
            });
			
			$('.chosen-select').chosen({width: "100%"});

		});

		</script>
		<?$this->load->view("templates/script")?>
	</body>

</html>
